$().ready(function () {
// 在键盘按下并释放及提交后验证提交表单
    // 登录和产品添加
    $("form").validate({
        rules: {
            old_password: {
                required: true,
                minlength: 5,
                maxlength: 16
            },

            new_password: {
                required: true,
                minlength: 5,
                maxlength: 16
            },

            confirm_password: {
                required: true,
                minlength: 5,
                maxlength: 16
            }
        },
        messages: {
            old_password: {
                required: "请输入旧密码",
                minlength: "密码长度不能小于5个字符",
                maxlength: "最长不超过16个字符"
            },
            new_password: {
                required: "请输入新密码",
                minlength: "密码长度不能小于5个字符",
                maxlength: "最长不超过16个字符"
            },

            confirm_password: {
                required: "请输入确认密码",
                minlength: "密码长度不能小于5个字符",
                maxlength: "最长不超过16个字符"
            }

        }
    })
});